package writtenexamination.leys;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author cyt
 * @create 2020-09-29 17:01
 */
public class Tb {


    public static void main(String[] args) {

        Tb tb = new Tb();
        int[] ints = {14, 11, 4, 6, 31};
        System.out.println(tb.get(5, ints));
    }

    public int get(int count, int[] depth) {

        int asInt = Arrays.stream(depth).min().getAsInt();
        int min = 0;
        for (int i = 0; i < depth.length; i++) {
            if (depth[i] == asInt) {
                min = i;
            }
        }
        System.out.println(count - min);
        return count - min;
    }
}
